package com.beep.erp.common.widget;

import android.content.Context;
import android.support.v4.app.FragmentTabHost;
import android.util.AttributeSet;

/**
 * FileName: BottomNavigationBar
 * description: 底部导航栏
 * Author: Jolly
 * Date: 2018/9/21
 */

public class BottomNavigationBar extends FragmentTabHost {

    private String mCurrentTag;

    private String mNoTabChangedTag;


    public BottomNavigationBar(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onTabChanged(String tag) {
        if (tag.equals(mNoTabChangedTag)) {
            setCurrentTabByTag(mCurrentTag);
        } else {
            super.onTabChanged(tag);
            mCurrentTag = tag;
        }
    }

    public void setNoTabChangedTag(String tag) {
        this.mNoTabChangedTag = tag;
    }

    public interface OnTabReselectListener {

        void onTabReselect();
    }
}
